<%@ Page Language="C#" MasterPageFile="~/MP/Classic.master" AutoEventWireup="true" Inherits="ConfigCusto_ManageRoles" Codebehind="ManageRoles.aspx.cs" RoleHint="Administrator" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContainer" Runat="Server">

    <div>
        <h1>Create new role</h1>
        <p>
            <asp:TextBox ID="RoleNameTextBox" Columns="30" runat="server" ValidationGroup="Group1"></asp:TextBox> 
            <asp:RequiredFieldValidator ID="RoleNameRequired" runat="server" Text="*" ControlToValidate="RoleNameTextBox" EnableClientScript="False" ValidationGroup="Group1" SetFocusOnError="True" />
            <asp:Button ID="CreateRoleButton" runat="server" Text="Create Role" OnClick="CreateRoleButton_Click" ValidationGroup="Group1" />
        </p>
    </div>
    
    <h1>Manage Roles</h1>
    
    <asp:GridView ID="RolesGrid" runat="server" AutoGenerateColumns="false" OnRowCommand="RolesGrid_RowCommand">
        <Columns>
            <asp:TemplateField HeaderText="Role Name">
                <ItemTemplate>
                    <%# Container.DataItem %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="DeleteButton" runat="server" CommandName="DeleteRole" CommandArgument='<%# Container.DataItem %>' Text="Delete" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

</asp:Content>